﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DateControls.TestWebSite._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="DateControls" Namespace="DateControls" TagPrefix="cal" %>
<link href="Styles/calendar/theme.css" rel="stylesheet" type="text/css" />

<link href="Styles/Styles.css" rel="stylesheet" type="text/css" />
<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <title></title>

   <%-- <script src="jquery.min.js" type="text/javascript"></script>
     <script type="text/javascript">
     $("#testDateTimePicker").ready(function() {
                     var date = $(this).val();
                     
                     if (date.length == 0) {
                        $(this).addClass("DateTextBox");
                     }                    
                 });
                 
         $(document).ready(function() {
                
                   $("#testDateTimePicker").addClass("DateTextBox");
                               
                 
                 $("#testDateTimePicker").blur(function() {
                     var date = $(this).val();
                     
                     if (date.length != 0) {
                     
                         if ((/^([1-9]|0[1-9]|[12][0-9]|3[01])[ /.]([1-9]|0[1-9]|1[012])[ /.][1-2][0-9]{3}\s([0-1][0-9]|[2][0-3]):([0-5][0-9])$/).test(date)) {
                             if ($(this).hasClass("DateTextBox")) {
                                $(this).removeClass("DateTextBox");                       
                             }    
                         }
                         else {
                             $(this).addClass("DateTextBox");
                         }
                     } else {
                            if ($(this).hasClass("DateTextBox")) {
                                $(this).removeClass("DateTextBox");                       
                             }   
                     }
                     
                 });

             $("#testDateTimePickerCalendar_Button").click(function() {
                 $("#testDateTimePicker").val("");
                 if ($("#testDateTimePicker").hasClass("DateTextBox")) {
                     $("#testDateTimePicker").removeClass("DateTextBox");
                 }
             });
             
            
         });
</script>--%>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="TestSM"></asp:ScriptManager>
    <div>
       DateTextBox
       <cal:DateTextBox runat="server" ID="testDateTextBox" Enabled="true" IsValidEmpty="false" ErrorCSSClass="DateTextBox"></cal:DateTextBox><asp:Label runat="server" ID="Label1"></asp:Label>
       <br />
      
       DatePicker
       <cal:DatePicker runat="server" ID="testDatePicker" Enabled="true" IsValidEmpty="false" ErrorCSSClass="DateTextBox"></cal:DatePicker><asp:Label runat="server" ID="Label2"></asp:Label>
              
       <br />
       DateTimePicker
       <cal:DateTimePicker runat="server" ID="testDateTimePicker" Enabled="true" IsValidEmpty="true" ErrorCSSClass="DateTextBox"></cal:DateTimePicker><asp:Label runat="server" ID="Label3"></asp:Label>
       
       <br />
       <asp:Button runat="server" ID="BtnTest" Text="Test" onclick="BtnTest_Click" />
       <br />        
        <asp:TextBox runat="server" ID="TestTxt"></asp:TextBox>
        <asp:Button runat="server" ID="BtnTest1" OnClick="Test_Click" />
    </div>
    </form>
</body>
</html>
